Optimal. Leaf size=227 \[ -\frac {\sqrt {-1+\sqrt {2}} \text {ArcTan}\left (\frac {3-2 \sqrt {2}+\left (1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {2 \left (-7+5 \sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}\right )}{f}-\frac {\sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {3+2 \sqrt {2}+\left (1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {2 \left (7+5 \sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}\right )}{f}+\frac {2 \sqrt {1+\tan (e+f x)}}{f}-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.29, antiderivative size = 227, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3647, 3728,
3712, 3563, 12, 3617, 3616, 209, 213} \begin {gather*} -\frac {\sqrt {\sqrt {2}-1} \text {ArcTan}\left (\frac {\left (1-\sqrt {2}\right ) \tan (e+f x)-2 \sqrt {2}+3}{\sqrt {2 \left (5 \sqrt {2}-7\right )} \sqrt {\tan (e+f x)+1}}\right )}{f}+\frac {2 \tan ^2(e+f x) (\tan (e+f x)+1)^{5/2}}{9 f}-\frac {8 \tan (e+f x) (\tan (e+f x)+1)^{5/2}}{63 f}-\frac {22 (\tan (e+f x)+1)^{5/2}}{63 f}+\frac {2 \sqrt {\tan (e+f x)+1}}{f}-\frac {\sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {\left (1+\sqrt {2}\right ) \tan (e+f x)+2 \sqrt {2}+3}{\sqrt {2 \left (7+5 \sqrt {2}\right )} \sqrt {\tan (e+f x)+1}}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 213
Rule 3563
Rule 3616
Rule 3617
Rule 3647
Rule 3712
Rule 3728
Rubi steps
\begin {align*} \int \tan ^4(e+f x) (1+\tan (e+f x))^{3/2} \, dx &=\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}+\frac {2}{9} \int \tan (e+f x) (1+\tan (e+f x))^{3/2} \left (-2-\frac {9}{2} \tan (e+f x)-2 \tan ^2(e+f x)\right ) \, dx\\ &=-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}+\frac {4}{63} \int (1+\tan (e+f x))^{3/2} \left (2-\frac {55}{4} \tan ^2(e+f x)\right ) \, dx\\ &=-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}+\int (1+\tan (e+f x))^{3/2} \, dx\\ &=\frac {2 \sqrt {1+\tan (e+f x)}}{f}-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}+\int \frac {2 \tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx\\ &=\frac {2 \sqrt {1+\tan (e+f x)}}{f}-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}+2 \int \frac {\tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx\\ &=\frac {2 \sqrt {1+\tan (e+f x)}}{f}-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}-\frac {\int \frac {1+\left (-1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx}{\sqrt {2}}+\frac {\int \frac {1+\left (-1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx}{\sqrt {2}}\\ &=\frac {2 \sqrt {1+\tan (e+f x)}}{f}-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}+\frac {\left (4-3 \sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{2 \left (-1+\sqrt {2}\right )-4 \left (-1+\sqrt {2}\right )^2+x^2} \, dx,x,\frac {1-2 \left (-1+\sqrt {2}\right )-\left (-1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}}\right )}{f}+\frac {\left (4+3 \sqrt {2}\right ) \text {Subst}\left (\int \frac {1}{2 \left (-1-\sqrt {2}\right )-4 \left (-1-\sqrt {2}\right )^2+x^2} \, dx,x,\frac {1-2 \left (-1-\sqrt {2}\right )-\left (-1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}}\right )}{f}\\ &=-\frac {\sqrt {-1+\sqrt {2}} \tan ^{-1}\left (\frac {3-2 \sqrt {2}+\left (1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {2 \left (-7+5 \sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}\right )}{f}-\frac {\sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {3+2 \sqrt {2}+\left (1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {2 \left (7+5 \sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}\right )}{f}+\frac {2 \sqrt {1+\tan (e+f x)}}{f}-\frac {22 (1+\tan (e+f x))^{5/2}}{63 f}-\frac {8 \tan (e+f x) (1+\tan (e+f x))^{5/2}}{63 f}+\frac {2 \tan ^2(e+f x) (1+\tan (e+f x))^{5/2}}{9 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.51, size = 155, normalized size = 0.68 \begin {gather*} \frac {2 \cos ^2(e+f x) \left (-63 \left (\frac {\tanh ^{-1}\left (\frac {\sqrt {1+\tan (e+f x)}}{\sqrt {1-i}}\right )}{\sqrt {1-i}}+\frac {\tanh ^{-1}\left (\frac {\sqrt {1+\tan (e+f x)}}{\sqrt {1+i}}\right )}{\sqrt {1+i}}\right ) (1+\tan (e+f x))^2+(1+\tan (e+f x))^{5/2} \left (71+7 \sec ^4(e+f x)-36 \tan (e+f x)+2 \sec ^2(e+f x) (-13+5 \tan (e+f x))\right )\right )}{63 f (\cos (e+f x)+\sin (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 245, normalized size = 1.08
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (1+\tan \left (f x +e \right )\right )^{\frac {9}{2}}}{9}-\frac {4 \left (1+\tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+2 \sqrt {1+\tan \left (f x +e \right )}-\frac {\sqrt {2}\, \left (-\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (1+\sqrt {2}-\sqrt {2 \sqrt {2}+2}\, \sqrt {1+\tan \left (f x +e \right )}+\tan \left (f x +e \right )\right )}{2}+\frac {2 \left (1-\sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\tan \left (f x +e \right )}-\sqrt {2 \sqrt {2}+2}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}-\frac {\sqrt {2}\, \left (\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (1+\sqrt {2}+\sqrt {2 \sqrt {2}+2}\, \sqrt {1+\tan \left (f x +e \right )}+\tan \left (f x +e \right )\right )}{2}+\frac {2 \left (1-\sqrt {2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {2}+2}+2 \sqrt {1+\tan \left (f x +e \right )}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}}{f}\) | \(245\) |
default | \(\frac {\frac {2 \left (1+\tan \left (f x +e \right )\right )^{\frac {9}{2}}}{9}-\frac {4 \left (1+\tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+2 \sqrt {1+\tan \left (f x +e \right )}-\frac {\sqrt {2}\, \left (-\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (1+\sqrt {2}-\sqrt {2 \sqrt {2}+2}\, \sqrt {1+\tan \left (f x +e \right )}+\tan \left (f x +e \right )\right )}{2}+\frac {2 \left (1-\sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\tan \left (f x +e \right )}-\sqrt {2 \sqrt {2}+2}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}-\frac {\sqrt {2}\, \left (\frac {\sqrt {2 \sqrt {2}+2}\, \ln \left (1+\sqrt {2}+\sqrt {2 \sqrt {2}+2}\, \sqrt {1+\tan \left (f x +e \right )}+\tan \left (f x +e \right )\right )}{2}+\frac {2 \left (1-\sqrt {2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {2}+2}+2 \sqrt {1+\tan \left (f x +e \right )}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}}{f}\) | \(245\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1105 vs.
\(2 (190) = 380\).
time = 1.04, size = 1105, normalized size = 4.87 \begin {gather*} -\frac {252 \cdot 8^{\frac {1}{4}} \sqrt {2} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} f \frac {1}{f^{4}}^{\frac {1}{4}} \arctan \left (\frac {1}{16} \cdot 8^{\frac {3}{4}} \sqrt {2} {\left (2 \, f^{5} \sqrt {\frac {1}{f^{4}}} + \sqrt {2} f^{3}\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) + 8^{\frac {1}{4}} {\left (\sqrt {2} f^{3} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) + f \cos \left (f x + e\right )\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {1}{4}} + 2 \, \cos \left (f x + e\right ) + 2 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {3}{4}} - \frac {1}{8} \cdot 8^{\frac {3}{4}} {\left (2 \, f^{5} \sqrt {\frac {1}{f^{4}}} + \sqrt {2} f^{3}\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {3}{4}} - f^{2} \sqrt {\frac {1}{f^{4}}} - \sqrt {2}\right ) \cos \left (f x + e\right )^{4} + 252 \cdot 8^{\frac {1}{4}} \sqrt {2} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} f \frac {1}{f^{4}}^{\frac {1}{4}} \arctan \left (\frac {1}{16} \cdot 8^{\frac {3}{4}} \sqrt {2} {\left (2 \, f^{5} \sqrt {\frac {1}{f^{4}}} + \sqrt {2} f^{3}\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) - 8^{\frac {1}{4}} {\left (\sqrt {2} f^{3} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) + f \cos \left (f x + e\right )\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {1}{4}} + 2 \, \cos \left (f x + e\right ) + 2 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {3}{4}} - \frac {1}{8} \cdot 8^{\frac {3}{4}} {\left (2 \, f^{5} \sqrt {\frac {1}{f^{4}}} + \sqrt {2} f^{3}\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {3}{4}} + f^{2} \sqrt {\frac {1}{f^{4}}} + \sqrt {2}\right ) \cos \left (f x + e\right )^{4} + 63 \cdot 8^{\frac {1}{4}} {\left (\sqrt {2} f^{3} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right )^{4} + 2 \, f \cos \left (f x + e\right )^{4}\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \frac {1}{f^{4}}^{\frac {1}{4}} \log \left (\frac {2 \, {\left (2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) + 8^{\frac {1}{4}} {\left (\sqrt {2} f^{3} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) + f \cos \left (f x + e\right )\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {1}{4}} + 2 \, \cos \left (f x + e\right ) + 2 \, \sin \left (f x + e\right )\right )}}{\cos \left (f x + e\right )}\right ) - 63 \cdot 8^{\frac {1}{4}} {\left (\sqrt {2} f^{3} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right )^{4} + 2 \, f \cos \left (f x + e\right )^{4}\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \frac {1}{f^{4}}^{\frac {1}{4}} \log \left (\frac {2 \, {\left (2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) - 8^{\frac {1}{4}} {\left (\sqrt {2} f^{3} \sqrt {\frac {1}{f^{4}}} \cos \left (f x + e\right ) + f \cos \left (f x + e\right )\right )} \sqrt {-2 \, \sqrt {2} f^{2} \sqrt {\frac {1}{f^{4}}} + 4} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}} \frac {1}{f^{4}}^{\frac {1}{4}} + 2 \, \cos \left (f x + e\right ) + 2 \, \sin \left (f x + e\right )\right )}}{\cos \left (f x + e\right )}\right ) - 16 \, {\left (71 \, \cos \left (f x + e\right )^{4} - 26 \, \cos \left (f x + e\right )^{2} - 2 \, {\left (18 \, \cos \left (f x + e\right )^{3} - 5 \, \cos \left (f x + e\right )\right )} \sin \left (f x + e\right ) + 7\right )} \sqrt {\frac {\cos \left (f x + e\right ) + \sin \left (f x + e\right )}{\cos \left (f x + e\right )}}}{504 \, f \cos \left (f x + e\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (\tan {\left (e + f x \right )} + 1\right )^{\frac {3}{2}} \tan ^{4}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.84, size = 252, normalized size = 1.11 \begin {gather*} \frac {\sqrt {\sqrt {2} - 1} \arctan \left (\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} + 2 \, \sqrt {\tan \left (f x + e\right ) + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right )}{f} + \frac {\sqrt {\sqrt {2} - 1} \arctan \left (-\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} - 2 \, \sqrt {\tan \left (f x + e\right ) + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right )}{f} - \frac {\sqrt {\sqrt {2} + 1} \log \left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} \sqrt {\tan \left (f x + e\right ) + 1} + \sqrt {2} + \tan \left (f x + e\right ) + 1\right )}{2 \, f} + \frac {\sqrt {\sqrt {2} + 1} \log \left (-2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} \sqrt {\tan \left (f x + e\right ) + 1} + \sqrt {2} + \tan \left (f x + e\right ) + 1\right )}{2 \, f} + \frac {2 \, {\left (7 \, f^{8} {\left (\tan \left (f x + e\right ) + 1\right )}^{\frac {9}{2}} - 18 \, f^{8} {\left (\tan \left (f x + e\right ) + 1\right )}^{\frac {7}{2}} + 63 \, f^{8} \sqrt {\tan \left (f x + e\right ) + 1}\right )}}{63 \, f^{9}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.00, size = 118, normalized size = 0.52 \begin {gather*} \frac {2\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}}{f}-\frac {4\,{\left (\mathrm {tan}\left (e+f\,x\right )+1\right )}^{7/2}}{7\,f}+\frac {2\,{\left (\mathrm {tan}\left (e+f\,x\right )+1\right )}^{9/2}}{9\,f}+\mathrm {atan}\left (f\,\sqrt {\frac {\frac {1}{2}-\frac {1}{2}{}\mathrm {i}}{f^2}}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\,1{}\mathrm {i}\right )\,\sqrt {\frac {\frac {1}{2}-\frac {1}{2}{}\mathrm {i}}{f^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (f\,\sqrt {\frac {\frac {1}{2}+\frac {1}{2}{}\mathrm {i}}{f^2}}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\,1{}\mathrm {i}\right )\,\sqrt {\frac {\frac {1}{2}+\frac {1}{2}{}\mathrm {i}}{f^2}}\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________